package cn.cmcc.intertelecom.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;



import cn.cmcc.intertelecom.bean.Msg;
import cn.cmcc.intertelecom.bean.Power;

import cn.cmcc.intertelecom.service.PowerService;

@Controller
public class PowerController {
	@Autowired
	private PowerService powerService;

	
	@ResponseBody
	@RequestMapping(value="power/{moduleId}" ,method=RequestMethod.GET)
	public Msg getPowerByoduleId(@PathVariable("moduleId")Integer moduleId){
		
		List<Power> list = powerService.getPowerByoduleId(moduleId);
		
		return Msg.success().add("list", list);
	}
}
